#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/spinlock.h>

#include <asm/setup.h>

/*
 * Debug helper: via this flag we know that we are in 'early bootup code'
 * where only the boot processor is running with IRQ disabled.  This means
 * two things - IRQ must not be enabled before the flag is cleared and some
 * operations which are not allowed with IRQ disabled are allowed while the
 * flag is set.
 */
bool early_boot_irqs_disabled __read_mostly;

/* Untouched command line saved by arch-specific code. */
char __initdata boot_command_line[COMMAND_LINE_SIZE];

asmlinkage __visible void __init start_kernel(void)
{
	char *command_line;

	local_irq_disable();
	early_boot_irqs_disabled = true;

	uart_init();
	pr_notice("%s", linux_banner);
	setup_arch(&command_line);

	early_boot_irqs_disabled = false;
	local_irq_enable();

	while (1);
}

#if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_STRICT_MODULE_RWX)
bool rodata_enabled __ro_after_init = true;
#endif
